import generatedRoutes from 'virtual:generated-pages'

const global = [
  {
    path: '/client/:id',
    name: 'Client Detail',
    component: () => import('@/layout/ClientLayout.vue'),
    meta: {},
    children: generatedRoutes.filter(route => route.path.match(/^\/client\//)).sort((a, b) => a.meta.sort - b.meta.sort)
  },
  {
    path: '/price/:id',
    name: 'Price',
    component: () => import('@/pages/Client/servicePrice/components/quota.vue'),
    meta: {
      title: 'Service Price'
    },
    children: [
      {
        path: 'edit',
        name: 'Edit Price Application',
        component: () => import('@/pages/Client/servicePrice/components/edit.vue'),
        meta: {
          title: 'Edit Price Application'
        }
      }
    ]
  },
  {
    name: 'Page Not Found',
    path: '/:pathMatch(.*)*',
    component: () => import('@/layout/exception/404.vue'),
    meta: {}
  }
]
export default global
